Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send ec2 tags from deployd to TAS #1340

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Send ec2 tags from deployd to TAS #1340

merged 1 commit into from
Nov 16, 2023

Conversation

liyaqin1
Copy link
Contributor

@liyaqin1 liyaqin1 commented Nov 15, 2023

For ec2 tags used by deployment constraint, no need to use Teletraan worker to query from CMDB. We can get them from deployd agent running on the ec2 host.

@liyaqin1 liyaqin1 requested a review from a team as a code owner November 15, 2023 23:59
@liyaqin1
Copy link
Contributor Author

Tested on my devapp.

yaqinli@dev-yaqinli:~/code/teletraan/deploy-agent$ sudo facter -jp ec2_tags
{
  "ec2_tags": {
    "Name": "dev-yaqinli",
    "devapp_version": "None",
    "service_mapping": "dev",
    "usage_tag": "Dev Apps",
    "username": "yaqinli"
  }
}

Logs on TAS side:

teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,676] com.pinterest.deployservice.handler.PingHandler: go through ec2 tags: {"Name": "dev-yaqinli", "devapp_version": "None", "service_mapping": "dev", "usage_tag": "Dev Apps", "username": "yaqinli"}
teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,678] com.pinterest.deployservice.handler.PingHandler: key: Name, val: dev-yaqinli
teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,678] com.pinterest.deployservice.handler.PingHandler: key: devapp_version, val: None
teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,679] com.pinterest.deployservice.handler.PingHandler: key: service_mapping, val: dev
teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,679] com.pinterest.deployservice.handler.PingHandler: key: usage_tag, val: Dev Apps
teletraanconfigs-deploy-service-pinterest-1   | DEBUG [2023-11-15 23:52:57,679] com.pinterest.deployservice.handler.PingHandler: key: username, val: yaqinli

Copy link
Contributor

@ntascii ntascii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we check if it works for zk_role tags host? I think you can use cmdb to seee the tags on a sample host.

@liyaqin1
Copy link
Contributor Author

can we check if it works for zk_role tags host? I think you can use cmdb to seee the tags on a sample host.

I could not able to install this new deployd on a sample host like that. But it should work since using the same command we can get the zk_role tag:

zhu@zookeeper-dynamic-hbaseproxy-shared-dev-0a0c1f5f:~$ sudo facter -jp ec2_tags
{
  "ec2_tags": {
    "Autoscaling": "zookeeper-dynamic-hbaseproxy-shared-dev",
    "Name": "zookeeper-dynamic-hbaseproxy-shared-dev-0a0c1f5f",
    "aws:autoscaling:groupName": "zookeeper-dynamic-hbaseproxy-shared-dev",
    "pinterest.com/identity": "nimbus.hbase.teletraan.aws-us-east-1.zookeeper-dynamic.hbaseproxy-shared-dev",
    "pinterest.com/nimbus-uuid": "177f93f9-a9cb-4764-917b-93e244c6fda0",
    "service_mapping": "zookeeper-dynamic-hbaseproxy-shared",
    "zk_role": "follower"
  }
}

@liyaqin1 liyaqin1 merged commit fba404c into master Nov 16, 2023
6 checks passed
@liyaqin1 liyaqin1 deleted the yaqin/sendHostTags branch November 16, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants